< previous page page_746 next page >

Page 746
How do you bring up a code window for a particular control?
Answer: Double-click the control. Right-click the control and select View Code.
Chapter 6: Variables
Name four of the different data types supported by Visual Basic.
Answer: String, Double, Single, Byte, Integer, Long, Currency, Date, and Variant.
Declare three local variables using the three types you listed for the previous question. (Be sure to use the naming standards.)
Answer:
9f31265bb40b592b1929e18a47ab28e5.gif
Dim strName As String
Dim lngValue As Long
Dim intValue As Integer
Dim dblValue As Double
Dim sngValue As Single
Dim vntValue As Variant
Dim curValue As Currency
Dim bytValue As Byte
Dim dtValue As Date
What will the following code display on a form?
9f31265bb40b592b1929e18a47ab28e5.gif
Dim vntString
vntString = "100" 
vntString = vntString + 50
Print vntString
Answer: 150.
Chapter 7: Arrays, Types, and Constants
What will the following code produce?
9f31265bb40b592b1929e18a47ab28e5.gif
Dim aintValues() As Integer

ReDim aintValues(1)
aintValues(0) = 10
Print aintValues(0)

 
< previous page page_746 next page >

If you like this book, buy it!